import request from '../request'
import requestParam from '../requestParam'
import requestUrl from '../requestUrl'

export function zbconfiglist (params) {
  return request({
    url: requestUrl('/wx/zb/zbconfiglist'),
    method: 'get',
    params: requestParam(params, 'get')
  })
}

export function zb () {
  return request({
    url: requestUrl('/wx/zb/selectzb'),
    method: 'get',
    params: requestParam('', 'get')
  })
}

export function add (params) {
  return request({
    url: requestUrl('/wx/zb/zbconfigadd'),
    method: 'post',
    data: requestParam(params)
  })
}

// 根据 指标编码和用户名查询指标
export function select (params) {
  return request({
    url: requestUrl('/wx/zb/zbconfigselect'),
    method: 'post',
    data: requestParam(params)
  })
}

export function update (params) {
  return request({
    url: requestUrl('/wx/zb/zbconfigupdate'),
    method: 'post',
    data: requestParam(params)
  })
}

export function del (params) {
  return request({
    url: requestUrl('/wx/zb/zbconfigdelete'),
    method: 'post',
    data: requestParam(params, 'post', false)
  })
}

export function addtest (params) {
  return request({
    url: requestUrl('/wx/zb/addtest'),
    method: 'post',
    data: requestParam(params)
  })
}
